<div class="child-box">
    <div class="layui-card layadmin-header">
        <div class="layui-breadcrumb" lay-filter="breadcrumb">
            <a href="javascript:" lay-href=""> <i class="iconfont iconhome"></i>首页</a>
            <a><cite>委托进口</cite></a>
            <a><cite>订单列表</cite></a>

            <div class="layui-card-header-left" title="刷新" zmark-event="layui.manage.render">
                <i class="layui-icon layui-icon-refresh layui-anim" zmark-anim="layui-anim-rotate"></i>
            </div>
        </div>
    </div>
    <div class="layui-card mt20">
        <div class="layui-card-body table-box">
            <form class="layui-form" method="post" id="form-order-list" onsubmit="return false" lay-filter="form-order-list">
                <input type="hidden" name="orderDateStart"/>
                <input type="hidden" name="orderDateEnd"/>
                <input type="hidden" name="orderStatusId"/>
                <input type="hidden" name="receivingMode"/>
                <div class="layui-row block pb10">
                    <ul class="extra-l fl" id="queryStatus">
                        <li><a href="javascript:" class="curr" status="">全部订单</a></li>
                        <li>
                            <a href="javascript:" status="waitEdit">
                                待修改
                                <em id="editQty"></em>
                            </a>
                        </li>
                        <li><a href="javascript:" status="waitPrice">待审价</a></li>
                        <li><a href="javascript:" status="waitInspection">待验货</a></li>
                        <li><a href="javascript:" status="waitDeclare">待报关</a></li>
                        <li><a href="javascript:" status="waitClearance">待通关</a></li>
                        <li class="fore2">
                            <input type="checkbox" name="paymentStatusId" lay-filter="checkbox-order-list-status" value="false" lay-skin="primary" title="未付汇完成"/>
                            <input type="checkbox" name="invoiceStatusId" lay-filter="checkbox-order-list-status" value="false" lay-skin="primary" title="未开票完成"/>
                        </li>
                        <li class="fore2">
                            <div class="search-box">
                                <input type="text" name="keyword" class="layui-input" placeholder="订单号/供应商名称/商品信息"/>
                                <button type="submit" class="layui-btn" lay-submit="" lay-filter="search-order-list"><i
                                        class="layui-icon layui-icon-search"></i></button>
                            </div>
                        </li>
                    </ul>
                    <div class="fr">
                        <button type="button" class="layui-btn" lay-href="/order/manage">快捷下单</button>
                        <button type="button" class="layui-btn" disabled id="btn-order-list-merge-pay" zmark-event="layui.orderList.mergePayApply">合并付汇</button>
                    </div>
                </div>
                <div class="layui-row">
                    <table class="zm-tab order-tab" id="tab-order-list">
                        <colgroup>
                            <col width="50">
                            <col width="120">
                            <col>
                            <col width="150">
                            <col width="150">
                            <col width="120">
                            <col width="120">
                        </colgroup>
                        <thead>
                        <tr>
                            <th>
                                <input type="checkbox" name="tabCheckAll" id="checkbox-order-list-check-all" lay-skin="primary" lay-filter="checkbox-order-list-check-all"/>
                            </th>
                            <th>
                                <div class="more-operation" zmark-more-operation="layui.orderList.setDate" id="order-list-date">
                                    <div class="more-operation-txt"><div></div><b></b><span class="blank"></span></div>
                                    <div class="more-operation-list">
                                        <ul></ul>
                                    </div>
                                </div>
                            </th>
                            <th>订单详情</th>
                            <th>应付金额（人民币）</th>
                            <th>
                                <div class="more-operation" zmark-more-operation="layui.orderList.setReceivingMode" id="order-list-rm">
                                    <div class="more-operation-txt"><div></div><b></b><span class="blank"></span></div>
                                    <div class="more-operation-list">
                                        <ul></ul>
                                    </div>
                                </div>
                            </th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                        </thead>
                    </table>
                    <div class="blank-list">
                        <i class="iconfont iconwushuju"></i>
                        <dd>无订单数据，<a href="javascript:" class="tcolor" lay-href="/order/manage">立即下单</a></dd>
                    </div>
                    <div class="zm-pagination">
                        <div id="order-list-pagination"></div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/html" id="tpl-order-list">
    {{# layui.each(d,function(i,o){ }}
    <tbody>
    <tr class="sep-row">
        <td colspan="7"></td>
    </tr>
    <tr class="tr-th">
        <td colspan="7">
            <input type="checkbox" lay-skin="primary" name="orderId" value="{{o.id}}" lay-filter="checkbox-order-list-order-id"/>
            <span class="mr30"><a href="javascript:" lay-href="/order/detail/id={{o.id}}" title="{{o.docNo}}" class="copy">{{o.docNo}}</a></span>
            <span>日期：</span>
            <span title="{{o.orderDate}}" class="mr30 color-black">{{o.orderDate}}</span>
            <span>供应商：</span>
            <span class="color-black">{{layui.com.removeNull(o.supplierName)}}</span>
            <!--<div class="tr-operate">-->
                <!--<a href="javascript:" onclick="layui.payList.removeOrder('{{o.id}}','{{o.docNo}}')"><i class="iconfont iconhuishou"></i>删除</a>-->
            <!--</div>-->
        </td>
    </tr>
    <tr class="tr-tb">
        <td colspan="3">
            <div class="goodsitem">
                <div class="layui-row">
                    {{# if(o.member){ }}
                    名称：{{o.member.name}} 品牌：{{o.member.brand}} 型号：{{o.member.model}}
                    {{# }else{ }}
                    无产品信息
                    {{# } }}
                </div>
                <div class="layui-row color-grey">共【<span class="tcolor">{{o.totalMember}}</span>】条产品，金额：<span
                        class="tcolor">{{layui.com.formatCurrency(o.totalPrice)}} {{o.currencyName}}</span></div>
                <div class="layui-row color-grey order-pinv">
                    {{# if(o.paySituation == 1){ }}
                    <i class="iconfont iconfu1" title="未付汇"></i>
                    {{# }else if(o.paySituation == 2){ }}
                    <i class="iconfont iconfu1 color-blue" title="部分付汇"></i>
                    {{# }else if(o.paySituation == 3){ }}
                    <i class="iconfont iconfu1 color-green" title="付汇完成"></i>
                    {{# } }}
                    <i class="iconfont iconpiao1 {{ o.isInvoiceComplete?'color-green':'' }}" title="{{o.isInvoiceComplete?'已开票':'未开票'}}"></i>
                </div>
            </div>
        </td>
        <td>
            <div class="amount">
                <span class="color-grey">关税：</span><span>¥{{layui.com.formatCurrency(o.tariffRateVal)}}</span> <br>
                <span class="ftx-13"> <span class="color-grey">总计：</span>¥{{layui.com.formatCurrency(o.receAmount)}}</span>
            </div>
        </td>
        <td>
            <div class="layui-row color-grey">{{o.receivingModeName}}</div>
            {{# if(o.receivingMode == 'ThirdLogistics'){ }}
            <div class="layui-row color-grey">{{o.logisticsCompanyName}}</div>
            {{# } }}

            {{# if(o.receivingMode != 'SelfLifting'){ }}
            <div class="layui-row tooltip">
                <a href="javascript:"><i class="iconfont icongerenziliao"></i> {{o.deliveryLinkPerson}}</a>
                <div class="tip-box">
                    <div class="tip-con" style="width: 240px">
                        <strong>{{o.deliveryCompanyName}}</strong>
                        <p>{{o.deliveryAddress}}</p>
                        <p>{{o.deliveryLinkPerson}} {{o.deliveryLinkTel}}</p>
                    </div>
                    <div class="z-arrow z-arrow-left"></div>
                </div>
            </div>
            {{# }else{ }}
            <div class="layui-row tooltip">
                <a href="javascript:"><i class="iconfont icon-_cangku"></i> {{o.selfWareName}}</a>
                <div class="tip-box">
                    <div class="tip-con" style="width: 240px">
                        <p>提货联系人电话：{{o.selfLinkPerson}}</p>
                        <p>提货人身份证号：{{o.selfPersonId}}</p>
                    </div>
                    <div class="z-arrow z-arrow-left"></div>
                </div>
            </div>
            {{# } }}
        </td>
        <td>
            <div class="layui-row order-speed" speed="{{layui.orderList.judstatus(o.statusId)}}">
                <i class="iconfont iconxiangyou"></i>
                <i class="iconfont iconxiangyou"></i>
                <i class="iconfont iconxiangyou"></i>
                <i class="iconfont iconxiangyou"></i>
                <i class="iconfont iconxiangyou"></i>
            </div>
            {{# if(o.statusId != 'waitEdit'){ }}
            <div class="layui-row {{o.statusId}}">{{o.statusDesc}}</div>
            {{# } }}
            {{# if(o.statusId == 'waitEdit'){ }}
            <div class="layui-row {{o.statusId}}">
                <div status-id="{{o.id}}">

                </div>
            </div>
            {{# } }}
            <div class="layui-row"><a href="javascript:" lay-href="/order/detail/id={{o.id}}">订单详情</a></div>
        </td>
        <td>
            <a href="javascript:" lay-href="/order/printCost/id={{o.id}}">查看费用</a>
            {{# if(o.statusId == 'tempSaved'){ }}
            <a href="javascript:" class="layui-btn hollowing blue" lay-href="/order/manage/id={{o.id}}">继续下单</a>
            {{# }else if(o.statusId == 'waitEdit'){ }}
            <a href="javascript:" class="layui-btn hollowing" lay-href="/order/manage/id={{o.id}}">修改订单</a>
            {{# } }}

            {{# if(o.paySituation!=3 && o.totalPrice > 0 && o.totalPrice > o.payVal && o.statusId != 'tempSaved' && o.statusId != 'waitEdit'){ }}
            <a href="javascript:" lay-href="/finance/payApply/id={{o.id}}" class="layui-row">付汇申请</a>
            {{#} }}
            <a href="javascript:" lay-href="/order/printEntrust/id={{o.id}}" class="layui-row">委托书</a>
        </td>
    </tr>
    </tbody>
    {{# }); }}
</script>
<script type="text/html" id="tpl-wait-edit">
    <div class="layui-row tooltip">
        <a href="javascript:"><span class="{{d.nowStatusId}}"><i class="iconfont iconjinggao"></i> {{d.nowStausName}}</span></a>
        <div class="tip-box">
            <div class="tip-con" style="width: 240px">
                <p>原因：{{layui.com.removeNull(d.memo)}}</p>
            </div>
            <div class="z-arrow z-arrow-left"></div>
        </div>
    </div>
</script>
<script>
    layui.use('orderList', layui.factory('orderList'));
</script>